﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Yitter.IdGenerator;

namespace WMS.API.Controllers
{
    /// <summary>
    /// 公共方法控制器
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class CommController : ControllerBase
    {
        /// <summary>
        /// 生成随机编号
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        [HttpGet]
        public string GetCode(string code)
        {
            var i = YitIdHelper.NextId().ToString();
            code = code + i;
            return code;
        }
    }
}
